3.56 \(\int \frac{x^2 (a+b \log (c x^n))}{(d+e x)^4} \, dx\)

Optimal. Leaf size=79 \[ \frac{x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac{2 b n}{3 e^3 (d+e x)}+\frac{b d n}{6 e^3 (d+e x)^2}-\frac{b n \log (d+e x)}{3 d e^3} \]

[Out]

(b*d*n)/(6*e^3*(d + e*x)^2) - (2*b*n)/(3*e^3*(d + e*x)) + (x^3*(a + b*Log[c*x^n]))/(3*d*(d + e*x)^3) - (b*n*Lo
g[d + e*x])/(3*d*e^3)

________________________________________________________________________________________

Rubi [A]  time = 0.070735, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2335, 43} \[ \frac{x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac{2 b n}{3 e^3 (d+e x)}+\frac{b d n}{6 e^3 (d+e x)^2}-\frac{b n \log (d+e x)}{3 d e^3} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

(b*d*n)/(6*e^3*(d + e*x)^2) - (2*b*n)/(3*e^3*(d + e*x)) + (x^3*(a + b*Log[c*x^n]))/(3*d*(d + e*x)^3) - (b*n*Lo
g[d + e*x])/(3*d*e^3)

Rule 2335

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp
[((f*x)^(m + 1)*(d + e*x^r)^(q + 1)*(a + b*Log[c*x^n]))/(d*f*(m + 1)), x] - Dist[(b*n)/(d*(m + 1)), Int[(f*x)^
m*(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[m + r*(q + 1) + 1, 0] && NeQ[
m, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx &=\frac{x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac{(b n) \int \frac{x^2}{(d+e x)^3} \, dx}{3 d}\\ &=\frac{x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac{(b n) \int \left (\frac{d^2}{e^2 (d+e x)^3}-\frac{2 d}{e^2 (d+e x)^2}+\frac{1}{e^2 (d+e x)}\right ) \, dx}{3 d}\\ &=\frac{b d n}{6 e^3 (d+e x)^2}-\frac{2 b n}{3 e^3 (d+e x)}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac{b n \log (d+e x)}{3 d e^3}\\ \end{align*}

Mathematica [B]  time = 0.115571, size = 172, normalized size = 2.18 \[ -\frac{a d^2}{3 e^3 (d+e x)^3}+\frac{a d}{e^3 (d+e x)^2}-\frac{a}{e^3 (d+e x)}-\frac{b d^2 \log \left (c x^n\right )}{3 e^3 (d+e x)^3}+\frac{b d \log \left (c x^n\right )}{e^3 (d+e x)^2}-\frac{b \log \left (c x^n\right )}{e^3 (d+e x)}+\frac{b d n}{6 e^3 (d+e x)^2}-\frac{2 b n}{3 e^3 (d+e x)}+\frac{b n \log (x)}{3 d e^3}-\frac{b n \log (d+e x)}{3 d e^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

-(a*d^2)/(3*e^3*(d + e*x)^3) + (a*d)/(e^3*(d + e*x)^2) + (b*d*n)/(6*e^3*(d + e*x)^2) - a/(e^3*(d + e*x)) - (2*
b*n)/(3*e^3*(d + e*x)) + (b*n*Log[x])/(3*d*e^3) - (b*d^2*Log[c*x^n])/(3*e^3*(d + e*x)^3) + (b*d*Log[c*x^n])/(e
^3*(d + e*x)^2) - (b*Log[c*x^n])/(e^3*(d + e*x)) - (b*n*Log[d + e*x])/(3*d*e^3)

________________________________________________________________________________________

Maple [C]  time = 0.131, size = 553, normalized size = 7. \begin{align*} -{\frac{b \left ( 3\,{e}^{2}{x}^{2}+3\,dex+{d}^{2} \right ) \ln \left ({x}^{n} \right ) }{3\, \left ( ex+d \right ) ^{3}{e}^{3}}}-{\frac{2\,a{d}^{3}-6\,\ln \left ( -x \right ) bd{e}^{2}n{x}^{2}-6\,\ln \left ( -x \right ) b{d}^{2}enx+6\,\ln \left ( ex+d \right ) bd{e}^{2}n{x}^{2}+6\,\ln \left ( ex+d \right ) b{d}^{2}enx+6\,ad{e}^{2}{x}^{2}+6\,a{d}^{2}ex+2\,\ln \left ( c \right ) b{d}^{3}+3\,i\pi \,bd{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +3\,i\pi \,b{d}^{2}ex{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+3\,i\pi \,bd{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+3\,i\pi \,b{d}^{2}ex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) -3\,i\pi \,bd{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -3\,i\pi \,b{d}^{2}ex{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +6\,\ln \left ( c \right ) bd{e}^{2}{x}^{2}+6\,\ln \left ( c \right ) b{d}^{2}ex+i\pi \,b{d}^{3} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +i\pi \,b{d}^{3}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+3\,b{d}^{3}n-i\pi \,b{d}^{3}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -3\,i\pi \,bd{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-3\,i\pi \,b{d}^{2}ex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-i\pi \,b{d}^{3} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-2\,\ln \left ( -x \right ) b{d}^{3}n+2\,\ln \left ( ex+d \right ) b{d}^{3}n-2\,\ln \left ( -x \right ) b{e}^{3}n{x}^{3}+2\,\ln \left ( ex+d \right ) b{e}^{3}n{x}^{3}+7\,b{d}^{2}enx+4\,bd{e}^{2}n{x}^{2}}{6\,d{e}^{3} \left ( ex+d \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*x^n))/(e*x+d)^4,x)

[Out]

-1/3*b*(3*e^2*x^2+3*d*e*x+d^2)/(e*x+d)^3/e^3*ln(x^n)-1/6*(2*a*d^3-6*ln(-x)*b*d*e^2*n*x^2-6*ln(-x)*b*d^2*e*n*x+
6*ln(e*x+d)*b*d*e^2*n*x^2+6*ln(e*x+d)*b*d^2*e*n*x+6*a*d*e^2*x^2+6*a*d^2*e*x+2*ln(c)*b*d^3+3*I*Pi*b*d*e^2*x^2*c
sgn(I*c*x^n)^2*csgn(I*c)+3*I*Pi*b*d^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2+3*I*Pi*b*d*e^2*x^2*csgn(I*x^n)*csgn(I*c*
x^n)^2+3*I*Pi*b*d^2*e*x*csgn(I*c*x^n)^2*csgn(I*c)-3*I*Pi*b*d*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-3*I*P
i*b*d^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+6*ln(c)*b*d*e^2*x^2+6*ln(c)*b*d^2*e*x+I*Pi*b*d^3*csgn(I*c*x^n)
^2*csgn(I*c)+I*Pi*b*d^3*csgn(I*x^n)*csgn(I*c*x^n)^2+3*b*d^3*n-I*Pi*b*d^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-3
*I*Pi*b*d*e^2*x^2*csgn(I*c*x^n)^3-3*I*Pi*b*d^2*e*x*csgn(I*c*x^n)^3-I*Pi*b*d^3*csgn(I*c*x^n)^3-2*ln(-x)*b*d^3*n
+2*ln(e*x+d)*b*d^3*n-2*ln(-x)*b*e^3*n*x^3+2*ln(e*x+d)*b*e^3*n*x^3+7*b*d^2*e*n*x+4*b*d*e^2*n*x^2)/d/e^3/(e*x+d)
^3

________________________________________________________________________________________

Maxima [B]  time = 1.13069, size = 242, normalized size = 3.06 \begin{align*} -\frac{1}{6} \, b n{\left (\frac{4 \, e x + 3 \, d}{e^{5} x^{2} + 2 \, d e^{4} x + d^{2} e^{3}} + \frac{2 \, \log \left (e x + d\right )}{d e^{3}} - \frac{2 \, \log \left (x\right )}{d e^{3}}\right )} - \frac{{\left (3 \, e^{2} x^{2} + 3 \, d e x + d^{2}\right )} b \log \left (c x^{n}\right )}{3 \,{\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} - \frac{{\left (3 \, e^{2} x^{2} + 3 \, d e x + d^{2}\right )} a}{3 \,{\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="maxima")

[Out]

-1/6*b*n*((4*e*x + 3*d)/(e^5*x^2 + 2*d*e^4*x + d^2*e^3) + 2*log(e*x + d)/(d*e^3) - 2*log(x)/(d*e^3)) - 1/3*(3*
e^2*x^2 + 3*d*e*x + d^2)*b*log(c*x^n)/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3) - 1/3*(3*e^2*x^2 + 3*d*e
*x + d^2)*a/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3)

________________________________________________________________________________________

Fricas [B]  time = 1.079, size = 392, normalized size = 4.96 \begin{align*} \frac{2 \, b e^{3} n x^{3} \log \left (x\right ) - 3 \, b d^{3} n - 2 \, a d^{3} - 2 \,{\left (2 \, b d e^{2} n + 3 \, a d e^{2}\right )} x^{2} -{\left (7 \, b d^{2} e n + 6 \, a d^{2} e\right )} x - 2 \,{\left (b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2} + 3 \, b d^{2} e n x + b d^{3} n\right )} \log \left (e x + d\right ) - 2 \,{\left (3 \, b d e^{2} x^{2} + 3 \, b d^{2} e x + b d^{3}\right )} \log \left (c\right )}{6 \,{\left (d e^{6} x^{3} + 3 \, d^{2} e^{5} x^{2} + 3 \, d^{3} e^{4} x + d^{4} e^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="fricas")

[Out]

1/6*(2*b*e^3*n*x^3*log(x) - 3*b*d^3*n - 2*a*d^3 - 2*(2*b*d*e^2*n + 3*a*d*e^2)*x^2 - (7*b*d^2*e*n + 6*a*d^2*e)*
x - 2*(b*e^3*n*x^3 + 3*b*d*e^2*n*x^2 + 3*b*d^2*e*n*x + b*d^3*n)*log(e*x + d) - 2*(3*b*d*e^2*x^2 + 3*b*d^2*e*x
+ b*d^3)*log(c))/(d*e^6*x^3 + 3*d^2*e^5*x^2 + 3*d^3*e^4*x + d^4*e^3)

________________________________________________________________________________________

Sympy [A]  time = 12.317, size = 646, normalized size = 8.18 \begin{align*} \begin{cases} \tilde{\infty } \left (- \frac{a}{x} - \frac{b n \log{\left (x \right )}}{x} - \frac{b n}{x} - \frac{b \log{\left (c \right )}}{x}\right ) & \text{for}\: d = 0 \wedge e = 0 \\\frac{\frac{a x^{3}}{3} + \frac{b n x^{3} \log{\left (x \right )}}{3} - \frac{b n x^{3}}{9} + \frac{b x^{3} \log{\left (c \right )}}{3}}{d^{4}} & \text{for}\: e = 0 \\\frac{- \frac{a}{x} - \frac{b n \log{\left (x \right )}}{x} - \frac{b n}{x} - \frac{b \log{\left (c \right )}}{x}}{e^{4}} & \text{for}\: d = 0 \\\frac{6 a e^{3} x^{3}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{6 b d^{3} n \log{\left (\frac{d}{e} + x \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{5 b d^{3} n}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{18 b d^{2} e n x \log{\left (\frac{d}{e} + x \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{9 b d^{2} e n x}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{18 b d e^{2} n x^{2} \log{\left (\frac{d}{e} + x \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} + \frac{6 b e^{3} n x^{3} \log{\left (x \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} - \frac{6 b e^{3} n x^{3} \log{\left (\frac{d}{e} + x \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} + \frac{4 b e^{3} n x^{3}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} + \frac{6 b e^{3} x^{3} \log{\left (c \right )}}{18 d^{4} e^{3} + 54 d^{3} e^{4} x + 54 d^{2} e^{5} x^{2} + 18 d e^{6} x^{3}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))/(e*x+d)**4,x)

[Out]

Piecewise((zoo*(-a/x - b*n*log(x)/x - b*n/x - b*log(c)/x), Eq(d, 0) & Eq(e, 0)), ((a*x**3/3 + b*n*x**3*log(x)/
3 - b*n*x**3/9 + b*x**3*log(c)/3)/d**4, Eq(e, 0)), ((-a/x - b*n*log(x)/x - b*n/x - b*log(c)/x)/e**4, Eq(d, 0))
, (6*a*e**3*x**3/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) - 6*b*d**3*n*log(d/e + x
)/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) - 5*b*d**3*n/(18*d**4*e**3 + 54*d**3*e*
*4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) - 18*b*d**2*e*n*x*log(d/e + x)/(18*d**4*e**3 + 54*d**3*e**4*x + 54*
d**2*e**5*x**2 + 18*d*e**6*x**3) - 9*b*d**2*e*n*x/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e*
*6*x**3) - 18*b*d*e**2*n*x**2*log(d/e + x)/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3
) + 6*b*e**3*n*x**3*log(x)/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) - 6*b*e**3*n*x
**3*log(d/e + x)/(18*d**4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) + 4*b*e**3*n*x**3/(18*d*
*4*e**3 + 54*d**3*e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3) + 6*b*e**3*x**3*log(c)/(18*d**4*e**3 + 54*d**3*
e**4*x + 54*d**2*e**5*x**2 + 18*d*e**6*x**3), True))

________________________________________________________________________________________

Giac [B]  time = 1.32263, size = 261, normalized size = 3.3 \begin{align*} -\frac{2 \, b n x^{3} e^{3} \log \left (x e + d\right ) + 6 \, b d n x^{2} e^{2} \log \left (x e + d\right ) + 6 \, b d^{2} n x e \log \left (x e + d\right ) - 2 \, b n x^{3} e^{3} \log \left (x\right ) + 4 \, b d n x^{2} e^{2} + 7 \, b d^{2} n x e + 2 \, b d^{3} n \log \left (x e + d\right ) + 6 \, b d x^{2} e^{2} \log \left (c\right ) + 6 \, b d^{2} x e \log \left (c\right ) + 3 \, b d^{3} n + 6 \, a d x^{2} e^{2} + 6 \, a d^{2} x e + 2 \, b d^{3} \log \left (c\right ) + 2 \, a d^{3}}{6 \,{\left (d x^{3} e^{6} + 3 \, d^{2} x^{2} e^{5} + 3 \, d^{3} x e^{4} + d^{4} e^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="giac")

[Out]

-1/6*(2*b*n*x^3*e^3*log(x*e + d) + 6*b*d*n*x^2*e^2*log(x*e + d) + 6*b*d^2*n*x*e*log(x*e + d) - 2*b*n*x^3*e^3*l
og(x) + 4*b*d*n*x^2*e^2 + 7*b*d^2*n*x*e + 2*b*d^3*n*log(x*e + d) + 6*b*d*x^2*e^2*log(c) + 6*b*d^2*x*e*log(c) +
 3*b*d^3*n + 6*a*d*x^2*e^2 + 6*a*d^2*x*e + 2*b*d^3*log(c) + 2*a*d^3)/(d*x^3*e^6 + 3*d^2*x^2*e^5 + 3*d^3*x*e^4
+ d^4*e^3)